package itbour.onetouchshow.common;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by zjl_d on 2017/5/3.
 * 本接口用于Reftorfit请求逻辑的公共接口
 */
public interface RetrofitCommonRequestInterface {
//        private String string ;
//        private String random;
//        private String sign;
//        private int priority;
//        private String destination;

    /**
     * 常规post
     * @param string
     * @param random
     * @param sign
     * @param priority
     * @param destination
     * @return
     */
//    @FormUrlEncoded
//    @POST(AppNetConfig.HTTP_ENCRYPT_ENDDING)
//    Call<EncryptReturnBean> postReftroCommonRequest(@Field("string") String string, @Field("random") String random
//            , @Field("sign") String sign, @Field("priority") int priority, @Field("destination") String destination);

    /**
     * rxjava post模式
     * @param string
     * @param random
     * @param sign
     * @param priority
     * @param destination
     * @return
     */
    @FormUrlEncoded
    @POST(AppNetConfig.HTTP_ENCRYPT_ENDDING_POST)
    Observable<EncryptReturnBean> postReftroCommonRequest(@Field("string") String string, @Field("random") String random
            , @Field("sign") String sign, @Field("priority") int priority, @Field("destination") String destination);



    /**
     * 常规get
     * @param string
     * @param random
     * @param sign
     * @param priority
     * @param destination
     * @return
     */
//    @GET(AppNetConfig.HTTP_ENCRYPT_ENDDING_GET)
//    Call<EncryptReturnBean> getReftroCommonRequest(@Query("string") String string, @Query("random") String random
//            , @Query("sign") String sign, @Query("priority") int priority, @Query("destination") String destination);

    /**
     * RxJava get模式
     * @param string
     * @param random
     * @param sign
     * @param priority
     * @param destination
     * @return
     */
    @GET(AppNetConfig.HTTP_ENCRYPT_ENDDING_GET)
    Observable<EncryptReturnBean> getReftroCommonRequest(@Query("string") String string, @Query("random") String random
            , @Query("sign") String sign, @Query("priority") int priority, @Query("destination") String destination);
}
